package com.aizuda.boot.modules.business.permission.domain.request;

import com.aizuda.boot.modules.common.constant.enums.ContractScopeTypeEnums;
import com.aizuda.boot.modules.common.constant.enums.DataType;
import com.aizuda.boot.modules.common.constant.enums.ValidityType;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.Date;
import java.util.List;

@Schema(description = "修改权限请求对象")
@Data
public class UpdatePermissionVO {

    /**
     * 权限id
     */
    @Schema(description = "权限id", required = true)
    private Long permissionId;


    /**
     * 权限名称，用于描述权限作用
     */
    @Schema(description = "权限名称，用于描述权限作用", required = true)
    private String name;

    @Schema(description = "授权用户类型", required = true)
    private String grantUserType;

    @Schema(description = "授权用户ID")
    private List<String> grantUsers;

    @Schema(description = "授权部门ID")
    private List<String> grantDepartments;

    /**
     * 角色ID
     */
    @Schema(description = "角色ID")
    private String roleId;

    /**
     * 授权有效期
     */
    @Schema(description = "授权有效期,PERMANENT、FIXED_DATE", required = true)
    private ValidityType validType;

    /**
     * 数据类型
     */
    @Schema(description = "数据类型,CONTRACT、NEGOTIATION", required = true)
    private DataType dataType;

    /**
     * 合同数据范围
     */
    @Schema(description = "合同数据范围,ALL、DEPARTMENT、CUSTOM")
    private ContractScopeTypeEnums contractScope;

    @Schema(description = "协商数据范围")
    private ContractScopeTypeEnums negotiationScope;


    @Schema(description = "日期范围")
    private List<Date> validRange;

    @TableField(exist = false)
    @Schema(description = "自定义条件")
    private List<RoleDataIsolationConditionAddDTO> customCondition;
}